﻿using Camc.Quality.RecordTable.FormBase;
using Camc.Quality.RecordTable.FormClass;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Camc.Quality.RecordTable.FormEntity
{
    public class 通用多媒体记录表 : TableBase
    {
        public 通用多媒体记录表(int serialNum, Guid workStepEntityId, Guid processesEntityId, int sort, string fisrtDrawingNum)
        {
            SerialNum = serialNum;
            Sort = sort;
            WorkStepEntityId = workStepEntityId;
            ProcessesEntityId = processesEntityId;

            FisrtDrawingNum = fisrtDrawingNum;

        }

        public override string FormName { get; protected set; } = "通用多媒体记录表";

        public override string FisrtDrawingNum_DisplayName { get; protected set; } = "项目";
        public override bool FisrtDrawingNum_Show { get; protected set; } = true;

        public InspectionSignatureEntity SetInspectionSignature(InspectionSignatureEntity entity)
        {
            entity.InspectionSignatureName = "二检";
            entity.SetFirstOperator(null, "记录人", true, true, 0, null, "记录人操作时间", true, true, 0);
            entity.SetSecondOperator(null, "确认人", true, true, 0, null, "确认人操作时间", true, true, 0);
            return entity;
        }
        /// <summary>
        /// 插入记录要求表
        /// </summary>
        public RecordRequirementsEntity SetRecordRequirements(RecordRequirementsEntity entity, string recordLocation, string recordRequire)
        {
            entity.SetRecordLocation(recordLocation, "部位", false, true, 0);
            entity.SetRecordRequire(recordRequire, "拍照(摄像)", false, true, 0);
            return entity;
        }
        /// <summary>
        /// 插入多媒体
        /// </summary>
        public MultiMediaEntity SetMultiMedia(MultiMediaEntity entity, string photoNo)
        {
            entity.SetMultiMedia(photoNo, "照片（影像）编号", true, true, 0);
            return entity;
        }
        /// <summary>
        /// 插入实测结果表
        /// </summary>
        public MeasuredResultEntity SetMeasuredResult(MeasuredResultEntity entity, string confirmResult)
        {
            entity.SetConfirmResult(confirmResult, "确认结果", true, true, 0);
            return entity;
        }
    }
}
